package com.lagou.service;

import org.springframework.web.bind.annotation.PathVariable;

public interface CodeService {
    /**
     * 生成验证码并发送到对应邮箱，0.发送成功 1.发送失败 2.已注册 3.请一分钟后再试
     *
     * @param email
     * @return
     */
    String create(String email,String clientIp);

    /**
     * 校验验证码是否正确，0正确1错误2超时
     *
     * @param email
     * @param code
     * @return
     */
    String validate(String email, String code);
}
